Skip to content

feat: add java output for codegen initial version - #62

Closed
anghelflorinm wants to merge 44 commits into
mainfrom
java-output
Closed

feat: add java output for codegen initial version#62
anghelflorinm wants to merge 44 commits into
mainfrom
java-output

Conversation

@anghelflorinm

Copy link
Copy Markdown
Collaborator

This PR

  • adds an initial version for Java codegen

anghelflorinm and others added 30 commits September 10, 2024 10:05
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <44744433+anghelflorinm@users.noreply.github.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
…t schema

Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
format #2

Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Florin-Mihai Anghel <44744433+anghelflorinm@users.noreply.github.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
…emory files

Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Florin-Mihai Anghel <44744433+anghelflorinm@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Florin-Mihai Anghel <44744433+anghelflorinm@users.noreply.github.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
anghelflorinm and others added 13 commits November 27, 2024 11:36
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
🤖 I have created a release *beep* *boop*
---


## [0.1.9](v0.1.8...v0.1.9)
(2024-11-27)


### 🧹 Chore

* remove empty testutils package
([#55](#55))
([9dc1d9f](9dc1d9f))
* update back to previous mkdir permissions
([#61](#61))
([515b534](515b534))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
🤖 I have created a release *beep* *boop*
---


## [0.1.9](v0.1.8...v0.1.9)
(2024-11-27)


### 🧹 Chore

* remove empty testutils package
([#55](#55))
([9dc1d9f](9dc1d9f))
* update back to previous mkdir permissions
([#61](#61))
([515b534](515b534))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
This reverts commit 2753953.

Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
case types.StringType:
return "String"
default:
return ""

@kriscoleman kriscoleman Mar 4, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does types.ObjectType case belong here too?

EDIT: Michael let me know that this is OOS for now, so disregard 😄

@kriscoleman

Copy link
Copy Markdown
Collaborator

To better understand the project, I took the opportunity to get hands-on with this PR.

I built this branch and ran openfeature generate java, which successfully produced a valid Java class file:

image

Everything worked smoothly!

I do have a couple of follow-up questions:

  • I noticed a function was not generated for the Object flag theme customization. Is this expected behavior for now?
  • Is there any interest in supporting Kotlin code generation after this? Given Kotlin's interoperability with Java, I imagine the demand may not be strong, but I’d love to hear your thoughts.

Looking forward to your insights!

@beeme1mr

beeme1mr commented Mar 4, 2025

Copy link
Copy Markdown
Member
  • I noticed a function was not generated for the Object flag theme customization. Is this expected behavior for now?

Yeah, we're omitting objects for now. I'll cut a follow up issue to work on it later but it adds a lot of complexity.

  • Is there any interest in supporting Kotlin code generation after this? Given Kotlin's interoperability with Java, I imagine the demand may not be strong, but I’d love to hear your thoughts.

I'm in favor of adding support for Kotlin. However, please wait until my pending PR is merged. We'll likely be refactoring the generator logic fairly significantly.

@kriscoleman

Copy link
Copy Markdown
Collaborator

Yeah, we're omitting objects for now. I'll cut a follow up issue to work on it later but it adds a lot of complexity.

I think the idea to codegen dynamically structured flags is really neat. I can understand how it could quickly spiral into complexity though 😅

thanks for answering my questions!

@beeme1mr

Copy link
Copy Markdown
Member

I'll close this since the generator structure has changed significantly. I've created an issue to add a Java generator based on the new format. FYI @kriscoleman

#102 (comment)

@beeme1mr beeme1mr closed this Apr 25, 2025
jonathannorris added a commit that referenced this pull request Aug 4, 2026
- postcss <= 8.5.17 -> ^8.5.18 override (high, alert #62)
- pin fast-uri override to exact 3.1.4 per CodeRabbit review suggestion

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
jonathannorris added a commit that referenced this pull request Aug 17, 2026
* chore: resolve open dependabot security alerts

- vite ^6.4.2 -> ^6.4.3 (medium/high, alerts #57 #58)
- @babel/core transitive -> ^7.29.6 via override (low, alert #56)
- @angular/common, @angular/core, @angular/compiler 19.x -> 20.3.25 (high/medium, alerts #52 #53 #54 #55)

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* chore: align @openfeature/web-sdk with angular-sdk peer dependency

Address Copilot review feedback on PR #253: @openfeature/angular-sdk
1.3.1 requires @openfeature/web-sdk ^1.9.0 as a peer dependency, but
package.json still allowed ^1.7.3. Bump the declared range to match
and regenerate the lockfile.

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* chore: resolve additional dependabot alerts for fast-uri

- fast-uri ^3.1.2 -> ^3.1.4 (high, alert #59: host confusion via failed IDN canonicalization)
- fast-uri ^3.1.2 -> ^3.1.4 (high, alert #60: host confusion via literal backslash authority delimiter)

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* fix(deps): regenerate OpenAPI client for oapi-codegen v2.8.0

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* chore: resolve postcss alert and pin fast-uri exactly

- postcss <= 8.5.17 -> ^8.5.18 override (high, alert #62)
- pin fast-uri override to exact 3.1.4 per CodeRabbit review suggestion

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* chore: bump fast-uri to 3.1.5 for dependabot alert #64

- fast-uri 3.1.4 -> 3.1.5 (high, alert #64: host confusion via backslash authority introducer)

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* chore: resolve open dependabot security alerts

- @angular/core 20.3.25 -> 20.3.28 (high, alert #75: XSS via event-handler attributes)
- @angular/compiler 20.3.25 -> 20.3.28 (high, alert #74: XSS via event-handler attributes)
- @angular/common 20.3.25 -> 20.3.28 (high, alert #73: cache-key ambiguity in HttpTransferCache)
- brace-expansion 2.1.0 -> 2.1.4 (high, alert #72: DoS via exponential-time expansion)

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

---------

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
beeme1mr pushed a commit to joshhunt/cli that referenced this pull request Aug 18, 2026
* chore: resolve open dependabot security alerts

- vite ^6.4.2 -> ^6.4.3 (medium/high, alerts open-feature#57 open-feature#58)
- @babel/core transitive -> ^7.29.6 via override (low, alert open-feature#56)
- @angular/common, @angular/core, @angular/compiler 19.x -> 20.3.25 (high/medium, alerts open-feature#52 open-feature#53 open-feature#54 open-feature#55)

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* chore: align @openfeature/web-sdk with angular-sdk peer dependency

Address Copilot review feedback on PR open-feature#253: @openfeature/angular-sdk
1.3.1 requires @openfeature/web-sdk ^1.9.0 as a peer dependency, but
package.json still allowed ^1.7.3. Bump the declared range to match
and regenerate the lockfile.

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* chore: resolve additional dependabot alerts for fast-uri

- fast-uri ^3.1.2 -> ^3.1.4 (high, alert open-feature#59: host confusion via failed IDN canonicalization)
- fast-uri ^3.1.2 -> ^3.1.4 (high, alert open-feature#60: host confusion via literal backslash authority delimiter)

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* fix(deps): regenerate OpenAPI client for oapi-codegen v2.8.0

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* chore: resolve postcss alert and pin fast-uri exactly

- postcss <= 8.5.17 -> ^8.5.18 override (high, alert open-feature#62)
- pin fast-uri override to exact 3.1.4 per CodeRabbit review suggestion

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

* chore: bump fast-uri to 3.1.5 for dependabot alert open-feature#64

- fast-uri 3.1.4 -> 3.1.5 (high, alert open-feature#64: host confusion via backslash authority introducer)

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>

---------

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants